// 模型配置管理
const modelConfig = {
  currentModel: uni.getStorageSync('currentModel') || 'ep-20250225234229-pgnc8',
  models: [
    {
      id: 'ep-20250210200026-cdtrd',
      name: 'R1标准版',
      description: '标准性能的R1模型，适合一般对话场景'
    },
    {
      id: 'ep-20250225234229-pgnc8',
      name: 'V3高性能版',
      description: '高性能的V3模型，适合复杂对话和创意场景'
    },
    {
      id: 'ep-20250226203952-hcrvn',
      name: 'R1轻量版',
      description: '轻量级R1模型，适合简单对话场景'
    },
    {
      id: 'ep-20250226204501-hszpl',
      name: 'R1增强版',
      description: '增强型R1模型，性能介于标准版和高性能版之间'
    },
    {
      id: 'ep-20250315095003-gfw29',
      name: 'Doubao-1.5-pro-256k',
      description: 'Doubao-1.5-pro-256k'
    },
    {
      id: 'ep-20250304191825-4vqq9',
      name: 'doubao1.5-pro-32k',
      description: 'doubao1.5-pro-32k'
    },
    {
      id: 'ep-20250315095942-tcmqm',
      name: 'Doubao-1.5-pro-32k-character',
      description: 'Doubao-1.5-pro-32k-character'
    },
    {
      id: 'ep-20250315100032-4zv59',
      name: 'Doubao-1.5-lite-32k',
      description: 'Doubao-1.5-lite-32k'
    },
    {
      id: 'ep-20250325152741-dxgsz',
      name: 'Doubao-lite-4k-character',
      description: 'Doubao-lite-4k-character-240828'
    },
    {
      id: 'ep-20250325152639-2jcgz',
      name: 'Doubao-lite-32k-character',
      description: 'Doubao-lite-32k-character-241015'
    }
  ]
}

export default {
  get currentModel() {
    return modelConfig.currentModel
  },
  get models() {
    return modelConfig.models
  },
  setModel(modelId) {
    if (modelConfig.models.some(model => model.id === modelId)) {
      modelConfig.currentModel = modelId
      uni.setStorageSync('currentModel', modelId)
    }
  }
}